package Demo01;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-03
 * Time: 19:01
 */
public class test01 {
    public static void main(String[] args) {
        int a = 1;
        int b = 0;
        try {
            add(a,b);
        } catch (Exception e) {
            System.out.println("Exception");
        } finally {
        }
    }

    public static void add(int a,int b) throws ArithmeticException {
       if(b==0) {
           throw new ArithmeticException();
       }
    }
}
